package registnet.base;

/**
 * An implementation of a student's standing. The student's classification is 
 * determined on the basis of units completed. A student can be cassified as Good Standing,
 * Probation, Dismissed, etc.
 */
public class Standing {

	/**
	 * The string description of the standing.
	 */
	private String description;
	
	/**
	 * The type of standing in which a student may be classified.
	 */
	public static final Standing GOOD_STANDING = new Standing("GOOD STANDING");
	public static final Standing WARNING = new Standing("WARNING");
	public static final Standing PROBATION = new Standing("PROBATION");
	public static final Standing DISMISSED = new Standing("DISMISSED");
	public static final Standing PERMANENTLY_DISQUALIFIED = new Standing("PERMANENTLY DISQUALIFIED");
	
	/**
	 * Creates a standing with the given description.
	 * @param standing
	 */
	public Standing(String standing){
		this.description = standing;
	}
	
	/**
	 * Checks if the given standing is the same as the standing.
	 * @param standing
	 * @return true if the same, and false otherwise.
	 */
	public boolean equals(Standing standing){
		if(this.description.equals(standing.getDescription()))
			return true;
		else
			return false;
	}

	/**
	 * Returns the description of the standing.
	 * @return
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * Sets the description of the standing.
	 * @param standing
	 */
	public void setDescription(String standing) {
		this.description = standing;
	}
	
}
